using System;
using System.Collections.Generic;
using System.Text;
using QuanLyKhachSan.DTO;
using System.Data;
using QuanLyKhachSan.DAO;

namespace QuanLyKhachSan.BUS
{
    public class NguoiDungBUS
    {
        // Them nguoi dung
        public static bool Insert(NguoiDungDTO nguoiDungdto)
        {
            return NguoiDungDAO.Insert(nguoiDungdto);
        }

        // Xoa nguoi dung
        public static bool Delete(NguoiDungDTO nguoiDungdto)
        {
            return NguoiDungDAO.Delete(nguoiDungdto.TenDangNhap  );
        }

        // Cap nhat thong tin khach hang
        public static bool Update(NguoiDungDTO nguoiDungdto)
        {
            return NguoiDungDAO.Update(nguoiDungdto);
        }

        // Lay danh sach nguoi dung
        public static DataTable LayDSNguoiDung()
        {
            DataTable dt = new DataTable();
            dt = NguoiDungDAO.LayDanhSachNguoiDung();
            return dt;
        }
        // Lay danh sach nguoi dung theo ten nguoi dung
        public static DataTable LayDSNguoiDungTheoTenNguoiDung(string tenNguoiDung)
        {
            DataTable dt = new DataTable();
            dt = NguoiDungDAO.LayDSNguoiDungTheoTenND(tenNguoiDung);
            return dt;
        }
        // thong tin nguoi dung
        public static NguoiDungDTO ThongTinNguoiDung(string userName, string pass)
        {
            return NguoiDungDAO.ThongTinNguoiDung(userName, pass);
        }

    }
}
